<template>
	<view>
		<view class="content">
			<view class="text">{{info.content}}</view>
			<view class="time">{{info.createtime}}</view>
		</view>
	</view>
</template>

<script>
	import {Message} from '../../../apirequest/message-model.js';
	var m = new Message();
	export default {
		data() {
			return {
				id:0,
				info:''
			}
		},
		onLoad(options) {
			this.id = options.id
			this._index();
		},
		methods: {
			_index(){
				var that = this;
				m.get_msg_detail({id:this.id},(res) => {
					if(res.code == 1){
						that.info = res.data
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none'
						})
					}
				})
			},
		}
	}
</script>

<style lang="scss">
.content{
	margin: 25rpx;
	border-radius: 10rpx;
	background: #fff;
	padding: 20rpx;
	.text{
		font-size:0.95rem;
		line-height: 40rpx;
	}
	.time{
		text-align: right;
			font-size: 0.75rem;
			margin-top: 10rpx;
			}
}
</style>
